-module(utils).

%% ====================================================================
%% API functions
%% ====================================================================
-export([
         debug/2,
         debug/1,
         getNode/3
       ]).

%% ====================================================================
%% External exports
%% ====================================================================

debug(Value, Text) ->
    io:write(Text),
    io:nl(),
    io:write(Value),
    io:nl().

debug(Value) ->
    io:write(Value),
    io:nl().

%% returns Vertex_ID zo a given Name or false
getNode(_, [], _) ->
    false;
getNode(Graph, Vertexes, Name) ->
    [Node| T] = Vertexes,
    case graph:getValV(Graph, Node, 'name') of
        Name  -> Node;
        _Else -> getNode(Graph, T, Name)
    end.

%% ====================================================================
%% Internal functions
%% ====================================================================


